package com.kuqi.blog.controller;

import com.kuqi.blog.service.LoginService;
import com.kuqi.blog.vo.Result;
import com.kuqi.blog.vo.params.LoginParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:kuqi
 * @createTime:2021/12/13 11:01
 * @description:登录接口
 */

@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private LoginService loginServer;

    @PostMapping
    public Result login(@RequestBody LoginParams loginParams){
        return loginServer.login(loginParams);
    }

}
